//
//  WSJSuperTableview.m
//  WSJBaseProject
//
//  Created by wsj2015 on 2016/11/18.
//  Copyright © 2016年 wsj2015. All rights reserved.
//

#import "WSJSuperTableview.h"
#import "EmptyCustomView.h"
@implementation WSJSuperTableview



- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{
    if (self = [super initWithFrame:frame style:style]) {
        self.buttonText = @"";
        self.buttonNormalColor = [UIColor redColor];
        //        self.buttonHighlightColor = [UIColor yellowColor];
        self.loadedImageName = @"nocontent";
        self.descriptionText = @"暂无数据 - -!";
        self.dataVerticalOffset =  -100;
        self.customView_loading = [self loadingView];
        EmptyCustomView *emptyView =  [EmptyCustomView customView];
        self.customView_loaded_empty = emptyView;
        
        //loadingClick 让外面去实现
        __weak WSJSuperTableview *weakSelf = self;
        emptyView.btnClick = ^(){
            if (weakSelf.retryBlock) {
                weakSelf.retryBlock();
            }
        };
        
    }
    return self;
}
- (BALoadingView *)loadingView{
    BALoadingView *loadView =[[BALoadingView alloc] init];
    
    loadView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
    [loadView initialize];
    loadView.lineCap = kCALineCapRound;
    loadView.clockwise = true;
    loadView.segmentColor = kBorderColor;
    [loadView startAnimation:BACircleAnimationSemiCircle];
    loadView.transform =  CGAffineTransformMakeScale(.2,.2);
    return loadView;
}

@end
